import { Module } from '@nestjs/common';
import { ArticleService } from './article.service';
import { ArticleController } from './article.controller';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Article } from './entities/article.entity';
import { ArticleLike } from './entities/article-like.entity';
import { ArticleComment } from './entities/article-comment.entity';
import { PaginationModule } from '../../common/pagination/pagination.module';
import { PaginationService } from '../../common/pagination/pagination.service';
import { ClassificationModule } from '../classification/classification.module';
import { Classification } from '../classification/entities/classification.entity';
import { TagModule } from '../tag/tag.module';
import { UserModule } from '../user/user.module';
import { Tag } from '../tag/entities/tag.entity';

@Module({
  imports: [
    TypeOrmModule.forFeature([
      Article,
      ArticleLike,
      ArticleComment,
      Classification,
      Tag,
    ]),
    PaginationModule,
    PaginationService,
    ClassificationModule,
    TagModule,
    UserModule,
  ],
  controllers: [ArticleController],
  providers: [ArticleService],
  exports: [PaginationService],
})
export class ArticleModule {}
